import {
  fromJS
} from 'immutable'
import {
  GET_DETAIL
} from './constants'
const defaultState = fromJS({
  title: '',
  content: ''
})
export default (state = defaultState, action) => {
  switch (action.type) {
    case GET_DETAIL:
      return state.merge({
        title: action.detail.title,
        content: action.detail.content
      })
    default:
      return state
  }
}